import request from '@/utils/request'

export function fetchProjectChangeList() {
    return request({
      url: '/projectchanges',
      method: 'get'
    })
  }

export function fetchDoneProjectChangeList() {
  return request({
    url: '/projectchanges/done',
    method: 'get'
  })
}

export function fetchInProgressProjectChangeList() {
    return request({
      url: '/projectchanges/inprogress',
      method: 'get'
  })
}

export function fetchProjectChangeById(id) {
  return request({
    url: `/projectchanges/${id}`,
    method: 'get'
  })
}

export function getParticipateDoneProjectChecks(userId) {
  return request({
    url: `/projectchanges/participate/${userId}`,
    method: 'get'
  })
}

export function createProjectChange(data) {
    return request({
      url: '/projectchanges',
      method: 'post',
      data
    })
  }
  
  
  export function deleteProjectChange(id) {
      return request({
        url: `/projectchanges/${id}`,
        method: 'delete'
      })
  }